home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Spawn Figure Collection
/
spawn collection cd.iso
/
movies
/
collection.dir
/
00009_Script_File Script
< prev
next >
Wrap
Text File
|
1997-12-23
|
5KB
|
195 lines
-- ╔t╔@╔C╔πδ─τ╧
on WriteDataFile filename
set the keyDownScript to "noESC"
global gFileObj
global gTextResult
global gResult
global lSeries
global gLocalPath
set CRLF to RETURN&(numtochar(10))
set cs to 1
set ct to 1
set cg to 1
put FileIO(mNew,"write",gLocalPath & filename) into gFileObj
repeat with S = 1 to count(lSeries)
-- ╔V╔Σ┼[╔Y
set lS to getat(lSeries,S)
gFileObj(mWriteString,"SR:"&(the pSeries of lS)&CRLF)
set the text of field"CS" to string(cs)
set cs to cs + 1
set ct to 1
set cg to 1
repeat with T = 1 to count(the lTitle of lS)
-- ╔^╔C╔g╔π
set lT to getat(the lTitle of lS,T)
DevideText(the pTitle of lT)
gFileObj(mWriteString,"TI:"&gTextResult&CRLF)
DevideText(gResult)
gFileObj(mWriteString,"TI:"&gTextResult&CRLF)
gFileObj(mWriteString,"TI:"&gResult&numtochar(10))
set the text of field "CT" to string(ct)
set ct to ct + 1
set cg to 1
repeat with G = 1 to count(the lGroup of lT)
-- ╔O╔π┼[╔v
set lS to getat(lSeries,s)
set lT to getat(the lTitle of lS,t)
set lG to getat(the lGroup of lT,g)
-- ∞íΘ═τ─±₧Φδ╟┤Φo╟╡
gFileObj(mWriteString,"FL:"&the pProtect of lG&the pGroup of lG&the pCheckBox of lG&the pCheck of lG& CRLF)
-- ╔r╔b╔g╔}╔b╔v╔t╔@╔C╔π±║Φδ╟┤Φo╟╡
gFileObj(mWriteString,"BM:"&the pBitmap of lG& CRLF)
-- ╔R╔┼╔∞╔gΦδ╟┤Φo╟╡(╟▒╟═╟╝╟ó╟ó╟⌐φm╟┴╟╗╟ó)
set gResult to the pComment of lG
repeat while(1)
DevideText(gResult)
if(length (gResult) = 0) then
gFileObj(mWriteString,"CE:" & gTextResult & CRLF)
exit repeat
else
gFileObj(mWriteString,"CM:" & gTextResult & CRLF)
end if
end repeat
set the text of field "CG" to string(cg)
set cg to cg + 1
end repeat
end repeat
end repeat
gFileObj(mDispose)
end writeFile
on ReadDataFile filename
global gLocalPath
set the keyDownScript to "noESC"
global gFileObj
global gTextResult
-- ╔O╔τ┼[╔o╔π╟╗╔e╔L╔X╔g╟²╟°
global gSeries
global gTitle
global gDataFile
-- ╔J╔σ╔∞╔g╟├╔V╔Σ┼[╔Y┼A╔^╔C╔g╔π┼A╔O╔π┼[╔v
global gNowSeries
global gNowTitle
global gNowGroup
set gNowSeries to 0
set gNowTitle to 0
set gNowGroup to 0
put FileIO(mNew,"Read",gLocalPath & filename) into gFileObj
set cs to 1
set ct to 1
set cg to 1
repeat while(1)
put gFileObj(mReadLine) into tmp
put gFileObj(mReadChar) into TEMP
set tt to char 1 of tmp & char 2 of tmp
cutHead (tmp)
case tt of
"SR":
-- ╔V╔Σ┼[╔Y
set gSeries to gTextResult
set gNowSeries = gNowSeries + 1
add(lSeries,birth(script"Series Script"))
SetSeries getat(lSeries,gNowSeries),gSeries
set gNowTitle to 0
set gNowGroup to 0
set the text of field "CS" to string(cs)
set cs to cs + 1
set ct to 1
set cg to 1
"TI":
-- ╔^╔C╔g╔π
set gTitle to gTextResult & RETURN
put gFileObj(mReadLine) into tmp
put gFileObj(mReadChar) into TEMP
cutHead (tmp)
set gTitle to gTitle & gTextResult & RETURN
put gFileObj(mReadLine) into tmp
put gFileObj(mReadChar) into TEMP
cutHead(tmp)
set gTitle to gTitle & gTextResult & RETURN
set gNowTitle = gNowTitle + 1
set lS to getat(lSeries,gNowSeries)
if gNowTitle > count(the lTitle of lS) then
AddTitle lS
set gNowGroup = 0
end if
set lT to getat(the lTitle of lS,gNowTitle)
SetTitle lT,gTitle
set the text of field "CT" to string(ct)
set ct to ct + 1
set cg to 1
"FL":
set Flag to gTextResult
set Cm to ""
"BM":
set BitMap to gTextResult
"CM":
set Cm to Cm & gTextResult & RETURN
"CE":
set Cm to Cm & gTextResult & RETURN
-- ╔O╔π┼[╔v
set gNowGroup = gNowGroup + 1
set lS to getat(lSeries,gNowSeries)
set lT to getat(the lTitle of lS,gNowTitle)
if gNowGroup > count(the lGroup of lT) then
AddGroup lT
end if
set lG to getat(the lGroup of lT,gNowGroup)
SetGroup lG,Flag,BitMap,Cm
set the text of field "CG" to string(cg)
set cg to cg + 1
otherWise
-- ╔t╔@╔C╔π╔G╔∞╔h
exit repeat
end case
end repeat
gFileObj(mDispose)
end ReadDataFile
on SerchFolder path,type
set fileList to []
repeat with t = 1 to the maxinteger
put getNthFileNameInFolder (path,t) into n
if n = EMPTY then exit repeat
if n contains type then
append (fileList ,n)
end if
end repeat
return fileList
end
on DeleteFile filename
put FileIO(mNew,"Read",filename) into FileObj
FileObj(mDelete)
end
on CopyFile filename1,filename2
global gFileObj
global gFileObj2
put FileIO(mNew,"Read",the pathname & filename1) into gFileObj
put FileIO(mNew,"Write",the pathname & filename2) into gFileObj2
set n to gFileObj(mGetLength)
repeat with t = 1 to n
gfileObj2(mWriteChar,gFileObj(mReadChar))
end repeat
end